home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / DWGOut.bsc < prev    next >
Encoding:
Text File  |  2003-09-29  |  1.2 KB  |  55 lines

  1. ' DesignCAD Pro 2000 DWG Batch Export Program
  2. ' Please follow these steps to get results
  3. '
  4. ' 1) Browse to the target directory 
  5. ' 2) Goto DOS in that directory
  6. ' 3) Type Dir /b >Files.txt and press enter
  7. ' 4) Type Edit files.txt and remove the listing for
  8. '    files.txt in the files listing
  9. ' 5) Exit the DOS prompt and switch to D2k
  10. ' 6) Press Q and goto the File Locations tab
  11. ' 7) For Drawing files, browse to the target directory
  12. '    Note that too long a path will cause DesignCAD
  13. '    to report an error, so keep the path short.
  14. ' 8) Run the program
  15. ' 9) Don't forget to erase the files.txt file.
  16. '
  17. ' Set's the target file to open
  18.     Root$ = Sys$(20)
  19.     File$ = Root$ + "\" + "Files.txt"
  20. ' Opens the file
  21.     open "i", 1, File$
  22. ' Loop Until End of File
  23.     do while eof(1) = 0
  24.     input #1, A$
  25.     Path$ = Sys$(20)
  26.     B$ = Path$ + "\" +A$
  27. ' Opens the file, Fits it to Window
  28.     >Open
  29.       {
  30.     <Filename [B$]
  31.       }
  32.     >FitToAllWindow
  33.      {
  34.       }
  35. ' Makes Output File Strings
  36.     Bob = LEN(B$)
  37.     Bob = Bob -2
  38.     C$ = LEFT$(B$, Bob)
  39.     D$ = C$ + "DWG"
  40. ' Exports the file to DWG
  41.     >DwgOut
  42.      {
  43.     <Filename [D$]
  44.      }
  45. ' Closes each file
  46.     >Close
  47.      {
  48.     <SaveChanges 0
  49.     <FileName [B$]
  50.      }
  51.     loop
  52.     end
  53. ' End of file
  54.